<?php class Form_ContactForm extends Form_Custom_General {
        public function init() {

		$ctc_id = $this->createElement("hidden", "ctc_id")
                     ->setRequired(FALSE)
                     ->addValidator("NotEmpty", true, array("messages" => array("isEmpty" => "Please enter id")))
                     ->addFilters(array(
                         new Zend_Filter_StringTrim(),
                     ))
                     ->setAttribs(Array("class"=>"span6","placeholder"=>"Id"));
                     $this->addElement($ctc_id);

		$ctc_name = $this->createElement("text", "ctc_name")
                     ->setRequired(TRUE)
                     ->addValidator("NotEmpty", true, array("messages" => array("isEmpty" => "Please enter subject")))
                     ->addFilters(array(
                         new Zend_Filter_StringTrim(),
                     ))
                     ->setAttribs(Array("class"=>"","placeholder"=>""));
                     $this->addElement($ctc_name);

		$ctc_email = $this->createElement("text", "ctc_email")
                     ->setRequired(True)
                     ->addValidator("NotEmpty", true, array("messages" => array("isEmpty" => "Please enter Email-Id")))
                    ->addValidator(new Zend_Validate_EmailAddress()) 
                    ->addFilters(array(
                         new Zend_Filter_StringTrim(),
                     ))
                     ->setAttribs(Array("class"=>"" ,"rows"=>4,"placeholder"=>""));
            $ctc_email->getValidator('emailAddress')->setMessage("Email address is not valid.", Zend_Validate_EmailAddress::INVALID_FORMAT);
        
            $this->addElement($ctc_email);
				
		$ctc_subject = $this->createElement("text", "ctc_subject")
                     //->setRequired(TRUE)
                     ->addValidator("NotEmpty", true, array("messages" => array("isEmpty" => "Please enter Lastname")))
                     ->addFilters(array(
                         new Zend_Filter_StringTrim(),
                     ))
                     ->setAttribs(Array("class"=>"","placeholder"=>""));
                     $this->addElement($ctc_subject);
                     
			$ctc_message = $this->createElement("textarea", "ctc_message")
                     ->setRequired(True)
                     ->addValidator("NotEmpty", true, array("messages" => array("isEmpty" => "Please enter Message")))
                     ->addFilters(array(
                         new Zend_Filter_StringTrim(),
                     ))
                     ->setAttribs(Array("class"=>"","rows"=>"4","placeholder"=>""));
                     $this->addElement($ctc_message);
					 
					 
		    $ctc_send = $this->createElement("checkbox", "ctc_send")
                     //->setRequired(True)
                     ->addValidator("NotEmpty", true, array("messages" => array("isEmpty" => "Please check the checkbox")))
                     ->addFilters(array(
                         new Zend_Filter_StringTrim(),
                     ))
                     ->setAttribs(Array("class"=>"","placeholder"=>""));
                     $this->addElement($ctc_send);

					 
			/*$ctc_contactnumber = $this->createElement("text", "ctc_contactnumber")
                     //->setRequired(TRUE)
                     ->addValidator("NotEmpty", true, array("messages" => array("isEmpty" => "Please enter contactnumber")))
                     ->addFilters(array(
                         new Zend_Filter_StringTrim(),
                     ))
                     ->setAttribs(Array("class"=>"form-control","placeholder"=>"Contact Number"));
                     $this->addElement($ctc_contactnumber);*/
					 
			$ctc_createddate = $this->createElement("hidden", "ctc_createddate")
                     ->setRequired(FALSE)
                     ->addValidator("NotEmpty", true, array("messages" => array("isEmpty" => "Please enter create date")))
                     ->addFilters(array(
                         new Zend_Filter_StringTrim(),
                     ))
                     ->setAttribs(Array("class"=>"span6","placeholder"=>"Create Date"));
                     $this->addElement($ctc_createddate);

			
		$submit = $this->createElement("submit", "submit")
                ->setLabel('Send message')
				->setAttribs(Array("title" => "Save changes", "class"=>"button"));
        $this->addElement($submit);


        /*$reset = $this->createElement("reset", "Reset")
                ->setAttribs(Array("title" => "Save changes and continue to edit", "class"=>"btn-glow primary"));
        $this->addElement($reset); */  }
        }?>